import request from '@/utils/request'

export function getSubscribeList(params) {
  return request({
    url: '/api/flow/alert/subscribes',
    method: 'GET',
    params
  })
}

export function createSubscribe(region) {
  return request({
    url: '/api/flow/alert/subscribes',
    method: 'POST',
    data: region
  })
}

export function updateSubscribe(subscribe) {
  return request({
    url: '/api/flow/alert/subscribes/' + subscribe.id,
    method: 'PUT',
    data: subscribe
  })
}

export function deleteSubscribe(id) {
  return request({
    url: '/api/flow/alert/subscribes/' + id,
    method: 'DELETE'
  })
}

export function getMessageList(params) {
  return request({
    url: '/api/flow/alert/messages',
    method: 'GET',
    params
  })
}
